package user;

import book.BookList;
import operator.IOperation;

import java.util.Scanner;

/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-18
 */
public abstract class User {
    public String name;
    public IOperation[] ioper;
    public User(String name) {
        this.name = name;
    }
    public void doOperation(BookList bookList) {
        Scanner scan = new Scanner(System.in);
        int choice = scan.nextInt();
        if (choice >= 0 && choice < 5) {
            ioper[choice].work(bookList);
        } else {
            System.out.println("没有这个选项,请重新输入");
        }
    }
    public abstract void menu();
}
